/**
 * Created by hk on 2016/12/6.
 */
function showtime(){
    var today,date,year,hour,minute,second;
    var strDay;
    today = new Date();
    var n_day = today.getDay();
    switch (n_day){
        case 0:{
            strDay="Sunday";
        }break;
        case 1:{
            strDay="Monday";
        }break;
        case 2:{
            strDay="Tuesday";
        }break;
        case 3:{
            strDay="Wednesday";
        }break;
        case 4:{
            strDay="Thursday";
        }break;
        case 5:{
            strDay="Friday";
        }break;
        case 6:{
            strDay="Saturday";
        }break;
    }
    var strMonth;
    var n_month = today.getMonth();
    switch(n_month){
        case 0:{
            strMonth = "January";
        }break;
        case 1:{
            strMonth = "February";
        }break;
        case 2:{
            strMonth = "March";
        }break;
        case 3:{
            strMonth = "April";
        }break;
        case 4:{
            strMonth = "May";
        }break;
        case 5:{
            strMonth = "June";
        }break;
        case 6:{
            strMonth = "July";
        }break;
        case 7:{
            strMonth = "August";
        }break;
        case 8:{
            strMonth = "September";
        }break;
        case 9:{
            strMonth = "October";
        }break;
        case 10:{
            strMonth = "November";
        }break;
        case 11:{
            strMonth = "December";
        }break;
    }
    date = today.getDate();
    year = today.getFullYear();

    hour = ("0"+today.getHours()).slice(-2);
    minute = ("0"+today.getMinutes()).slice(-2);
    second = ("0" + today.getSeconds()).slice(-2);
    document.getElementById('hour-minute-second').innerHTML = hour + ":" + minute + ":" + second;
    document.getElementById('year-month-day-week').innerHTML = year + "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" + strMonth + "&nbsp&nbsp" + date + "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" + strDay;
    setTimeout("showtime();", 1000);

}